
        


        	






                    <div class="row">

                        <div class="">

							
							

                            <div class="form-bottom">
<h3 style="text-align: center; margin-top: 0px; margin-bottom: 20px;">会员注册</h3>
			                    <form id="verifyform" action="" onSubmit="return formsubmit();" class="login-form">
<!--<div class="form-group">

			                    		<label class="sr-only" for="form-username">手机号码：</label>

			                        	<input type="text" name="tel" placeholder="推荐人手机号码" class="form-username form-control" id="form-tel">

			                        </div>-->
                                    
                                    
                                    
                                    
			                    	<div class="form-group">

			                    		<label class="sr-only" for="form-username">手机号码：</label>

			                        	<input type="text" name="tel" placeholder="手机号码" class="form-username form-control" id="form-tel">

			                        </div>
			                        
			                        
			                        <div class="form-group">

			                    		<label class="sr-only" for="form-username">密　　码：</label>

			                        	<input type="password" name="password" placeholder="密码" class="form-username form-control">

			                        </div>
			                        
			                        
			                        <div class="form-group">

			                    		<label class="sr-only" for="form-username">确认密码：</label>

			                        	<input type="password" name="repassword" placeholder="确认密码" class="form-username form-control">

			                        </div>

			                        <div class="form-group">



<div class="row">
    <div class="col-xs-6"><label class="sr-only" for="form-password">请输入验证码</label>

			                        	<input type="text" name="verify" placeholder="请输入验证码" class="form-password form-control" id="form-password">
                                        </div><div class="col-xs-6">
                                        <button id="sendsms" type="button" class="btn btn-info" style="font-size:12px;">免费获取验证码</button></div>
</div>


			                        	
                                        
                                        
                                        
                                        

			                        </div>

			                        <button type="submit" class="btn">立即注册</button>
 
			                    </form>

		                    </div>

                        </div>

                    </div>

<script>


var countdown = 5*60; 
function settime(val) {
if (countdown == 0) {
val.removeAttribute("disabled");    
val.innerHTML="免费获取验证码"; 
countdown = 5*60; 
} else { 
val.setAttribute("disabled", true); 
val.innerHTML="重新发送(" + countdown + ")"; 
countdown--; 
} 
setTimeout(function() { 
settime(val) 
},1000) 
}


function formsubmit(){
	$.ajax({
		url : '{:U('')}',
		data:$('#verifyform').serialize(),
		dataType:"json",
		type:'POST',
		success: function(data){
			if(data.status == 1){
				alert('验证成功');
				window.location.href = '{:U('Member/Index/index')}';
			}else{
				alert(data.info);
			}
		}
	});
	return false;
}

$('#sendsms').click(function(e) {
	
    $.post('{:U('VerifyPhoneSend')}', {tel:$('#form-tel').val()}, function(d){
		alert(d.info);
		if(d.status == 1){
			settime(document.getElementById('sendsms'));
		}
		
	},'json');
});

</script>
